<?php
/**
* @version 1.5.x
* @package ZooTemplate Project
* @email webmaster@zootemplate.com
* @copyright (c) 2008 - 2011 http://www.ZooTemplate.com. All rights reserved.
*/
?>
<?php if($this->params->get('zt_change_color')) { ?>
<div id="option_wrapper" style="left:-170px;">
	<div class="inner">

			<?php
				$cookies = array();
				foreach($ids as $key => $val) {
				$cookies[] = $prefix.$key;
			?>
			<div class="rb-items clearfix">
				<span class="rb-title"><?php echo $val;?></span>
				<div class="rb-item" id="select_<?php echo $key;?>">
					<input id="color_<?php echo $key;?>" class="rb-color" name="color_<?php echo $key;?>" type="text" size="13" value="<?php echo $ztTools->getParamsValue($prefix.$key);?>" style="background-color:<?php echo $ztTools->getParamsValue($prefix.$key);?>" />
				</div>
				<script language="javascript" type="text/javascript">
					window.addEvent("load", function(){
						new MooRainbow('select_<?php echo $key;?>', {
							id: 'rainbow_<?php echo $key;?>',
							wheel: true,
							imgPath: '<?php echo $ztTools->templateurl();?>/images/rainbow/',
							startColor: $('color_<?php echo $key;?>').value.hexToRgb(true),
							onChange: function(color) {
								$('color_<?php echo $key;?>').value = color.hex;
								$('<?php echo $key;?>').setStyle('background-color', color.hex);
								$('color_<?php echo $key;?>').setStyle('background-color', color.hex);
								Cookie.write('<?php echo $prefix.$key;?>', color.hex);							
							},
							onComplete: function(color) {
								$('<?php echo $key;?>').setStyle('background-color', color.hex);
								$('color_<?php echo $key;?>').setStyle('background-color', color.hex);
								Cookie.write('<?php echo $prefix.$key;?>', color.hex);
							}
						});
					});
				</script>
			</div>
			<?php }?>

			<div class="rb-items clearfix">
				<span class="rb-title">Wrapper Pattern:</span>
				<div class="pattern-select">
					<div id="zt-wrapper-inner_select" class="pattern-active <?php echo $ztTools->getParamsValue($prefix.'zt-wrapper-inner_class');?>"></div>
				</div>
			</div>
			<div class="clearfix">
				<?php $cookies[] = $prefix.'zt-wrapper-inner_class';?>
				<div id="zt-wrapper-inner_popup" class="pattern-popup">
					<div class="lady_item pattern1"></div>
					<div class="lady_item pattern2"></div>
					<div class="lady_item pattern3"></div>
					<div class="lady_item pattern4"></div>
					<div class="lady_item pattern5"></div>
					<div class="lady_item pattern6"></div>
					<div class="lady_item pattern7"></div>
					<div class="lady_item pattern8"></div>
					<div class="lady_item pattern9"></div>
					<div class="lady_item pattern10"></div>
					<div class="lady_item pattern11"></div>
					<div class="lady_item pattern12"></div>
					<div class="lady_item pattern13"></div>
					<div class="lady_item pattern14"></div>
					<div class="lady_item pattern15"></div>
					<div class="lady_item pattern16"></div>
				</div>
				<script type="text/javascript" language="javascript">
				 window.addEvent("load", function(){     
					new LadyPopup('zt-wrapper-inner_select', {
						id: 'zt-wrapper-inner_popup',
						position: 'zt-wrapper-inner',
						prefix: '<?php echo $prefix;?>'
					});
				 });
				</script>
			</div>
			<div class="rb-items clearfix">
				<input type="button" onclick="javascript: onResetDefault(['<?php echo implode($cookies, '\',\'');?>']);" value="Reset" class="rb-reset" />
			</div>

	</div>
</div>
<div id="option_btn" style="left:0;"><span></span></div>
<?php } ?>